Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[code-infra] Changes for test util to work in vitest #43625

Merged
merged 55 commits into from
Nov 7, 2024

Conversation

JCQuintas
Copy link
Member

@JCQuintas JCQuintas commented Sep 5, 2024

Related to mui/mui-x#14508

Help toward mui/mui-public#170

@JCQuintas JCQuintas added test scope: code-infra Specific to the core-infra product labels Sep 5, 2024
@JCQuintas JCQuintas self-assigned this Sep 5, 2024
@mui-bot
Copy link

mui-bot commented Sep 5, 2024

Netlify deploy preview

https://deploy-preview-43625--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against dd8ee60

@oliviertassinari oliviertassinari changed the title [code-infra] changes for test util to work in vitest [code-infra] Changes for test util to work in vitest Sep 11, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 12, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 13, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 27, 2024
packages/mui-base/src/useList/useList.ts Outdated Show resolved Hide resolved
packages/mui-joy/src/Autocomplete/Autocomplete.test.tsx Outdated Show resolved Hide resolved
@@ -0,0 +1,9 @@
// Shim for vitest describe.skipIf to be able to run mocha and vitest side-by-side
// TODO: Remove after migration to vitest is complete
const describeSkipIf: (condition: boolean) => Mocha.PendingSuiteFunction =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope it's just temporary, as the name is terrible :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we'll turn this into describe.skipIf once we're away from mocha. There is no way to monkey patch in mocha, they don't expose these in the setup files

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 17, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 21, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 5, 2024
@JCQuintas
Copy link
Member Author

I've moved the test changes to #44325 so this PR is easier to review, and to also unblock other repos and teams

@JCQuintas
Copy link
Member Author

@michaldudak Feel free to review this, as mentioned on the previous comment, I've removed the changes to the tests themselves and left only the config changes necessary for other repos to run.

The current tests are passing, so this PR should be safe to merge.

Merging this should allow us to move further on the other repos, without relying on the codesandbox version 😆

Let me know if you think someone else should review this as well.

Copy link
Member

@michaldudak michaldudak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're already using this in Base UI (packaged by CSB CI), and we didn't hit any issues (apart from missing export in test-utils' package.json, but this has been resolved already). So I'm pretty confident it's OK.

@JCQuintas JCQuintas merged commit 8a34771 into mui:master Nov 7, 2024
19 checks passed
@JCQuintas JCQuintas deleted the vitest-compliance branch November 7, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: code-infra Specific to the core-infra product test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants